#include "freqgainucswidget.h"

FreqGainUCSWidget::FreqGainUCSWidget(QWidget *parent)
    : AGroupBox{parent}
{
    setMinimumSize(800, 300);
    setStyleSheet(QString(R"(
        QGroupBox {
            border: 1px solid #5E636B;
            background-color: #000000;
        }
    )"));

    ucs = new FreqGainUCS(this);
    // eqResetButton = new  QPushButton(tr(LABEL_RESET), this);
    // byPassButton = new  QPushButton(tr(LABEL_BYPASS), this);

    auto layout = new QVBoxLayout(this);
    // auto hLayout = new QHBoxLayout;

    layout->addWidget(ucs);
    // layout->addLayout(hLayout);

    // hLayout->addStretch();
    // hLayout->addWidget(eqResetButton);
    // hLayout->addWidget(byPassButton);

    // auto margins = hLayout->contentsMargins();
    // margins.setRight(CONTROL_FIXED_WIDTH / 2);
    // hLayout->setContentsMargins(margins);

    // eqResetButton->setFixedWidth(CONTROL_FIXED_WIDTH);
    // byPassButton->setFixedWidth(CONTROL_FIXED_WIDTH);

    connect(ucs, &FreqGainUCS::stateChanged, this, &FreqGainUCSWidget::stateChanged);
}

void FreqGainUCSWidget::setList(const QList<DMVariant> &list)
{
    ucs->setList(list);
}

void FreqGainUCSWidget::updateDm(const int &index, const DMVariant &dm)
{
    ucs->updateDm(index, dm);
}
